package com.lson.bus;

import com.lson.kafka.stream.entity.ProducerMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("bus")
public class BusController {
    @Autowired
    BusProducerService busProducerService;

    @RequestMapping("/test")
    public String test(){
        System.out.println(1111);
        String eventAction="update";
        ProducerMsg producerMsg = new ProducerMsg();
        producerMsg.setStatus("update2");
        producerMsg.setId("22222222");
        busProducerService.fireEvent(eventAction,producerMsg);
        return "success";
    }
}
